<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="./css/style.css">
  <link rel="stylesheet" href="./css/base.css">
  <link rel="stylesheet" href="./css/normalize.css">
  <link rel="stylesheet" href="./css/swiper-bundle.min.css">

  <script src="./js/jquery-3.6.0.min.js"></script>
  <script src="./js/swiper-bundle.min.js"></script>
  <script src="./js/common.js"></script>
  <style>
    .pnums i{
      font-size: 20px;
      display: inline-block;
      width: 20px;
      border: 1px solid #000;
      text-align: center;
      background-color: #f0f0f0;
      height: 33px;
      cursor: pointer;
    }
    /*谷歌*/
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
      -webkit-appearance: none;
    }
    /*火狐*/
    input[type="number"] {
      -moz-appearance: textfield;
    }
  </style>
  <script>
    function addBuyCar(){
      var pid = document.getElementById("pid").value;
      var num = document.getElementById("num").value;
      window.location.href="./addProOrder.php?a=add&pid="+pid+"&num="+num;
    }
  </script>
</head>
<body>
<!---------------------------------header----------------------->
<iframe src="./header.php" frameborder="0" name="header_iframe" width="100%" scrolling="no"></iframe>
<main>
  <div class="wrapper clearfix">
    <div class="commodity conter">
      <div class="main-left">
        <a href="#"><img src="./../../upload/<?=$pros['imgurl']?>" alt=""></a>
      </div>
      <div class="main-right">
        <form action="./addProOrder.php" method="post">
          <input type="hidden" id="pid" name="pid" value="<?=$pros['id']?>">
          <h2><?=$pros['description']?></h2>
          <p><?=$pros['name']?></p>
          <div class="dity">
            类型：<?=$pros['flname']?>
            库存：<input type="text" value="<?=$pros['pnum']?>" id="pnum">&nbsp;件
            <p class="pnums">
              数量：
              <i id="prep" onclick="changeNum('-','')" >-</i>
              <input type="number" value="1" style="height: 33px" id="num" onkeyup="changeNum1('')" name="num">
              <i id="add" onclick="changeNum('+','')">+</i>
            </p>
          </div>
          <div class="ri-but clearfix">
            <button class="left-but" type="submit">加入购物车</button>
            <button class="right-but" name="">立即购买</button>
          </div>
        </form>
      </div>

    </div>
  </div>
</main>
<iframe src="./footer.php" name="footer_iframe" width="100%" frameborder="0" scrolling="no"></iframe>
</body>
</html>